#pragma once
#include "OgitorsSingleton.h"
#include "moonAvatar.h"
#include "BaseEditor.h"
#include "NodeEditor.h"
#include "OgitorsRoot.h"

using namespace Ogre;
 
 //typedef std::map<int, AvatarResourceInfo> AvatarResourceInfOMAP;
 //typedef 	std::map<int, std::vector<AvatarResourceInfo> > PathMap;


 struct DanceInfo
 {
	 unsigned long id;
	 std::string file;
	 float bpm;
	 std::vector<int> key;
	 int reverse_key;
	 int round;
 };
//  enum 
//  {
// 	 E_SEX_FEMALE = 0,
// 	 E_SEX_MALE,
//  };


 typedef std::vector<DanceInfo> AnimationList;

class avatarManager : public CBaseEditor ,  public Ogitors::Singleton<avatarManager>
{
public:
	avatarManager( );
	~avatarManager() {}

	//std::string getModel();
    void init();
	//PathMap *    getPathMap() {return &m_PartLists[m_currentSex];} 
	//AvatarResourceInfOMAP* getAvatarResourceInfOMAP() {return &m_AvatarResources[m_currentSex];} 
	//SEXTYPE   m_currentSex;

	Ogre::StringVector FHAIRNames;
	Ogre::StringVector FCOATNames;
	Ogre::StringVector FHANDSNames;
	Ogre::StringVector FHEADNames;
	Ogre::StringVector FPANTSNames;
	Ogre::StringVector FSHOESNames;
	//Ogre::StringVector FSOCKSNames;
	Ogre::StringVector FattactMesh;
	Ogre::StringVector FOneMesh;
	Ogre::StringVector FShockMesh;
	Ogre::StringVector FAnimationSke;

	Ogre::StringVector MHAIRNames;
	Ogre::StringVector MCOATNames;
	Ogre::StringVector MHEADNames;
	Ogre::StringVector MHANDSNames;
	Ogre::StringVector MPANTSNames;
	Ogre::StringVector MSHOESNames;
 
	Ogre::StringVector  MOneMesh;
	Ogre::StringVector  MShockMesh;

	Ogre::StringVector MattactMesh;
	Ogre::StringVector MAnimationSke;

private:
	//AvatarResourceInfOMAP m_AvatarResources[2];
	//PathMap m_PartLists[2];

	AnimationList m_Steps;

	std::map<int, std::string> m_AvatarModels;

	// /void init(const char *cfg = "..\\Data\\PropertySheets\\1.xml");
	void initAvatarDefaultConfig(const std::string & config_path =  "..\\Data\\PropertySheets\\AvatarDefault.xml");
	//void initAvatarResources(const std::string & config_path = "..\\Data\\PropertySheets\\AvatarResources.xml");
	


};
